﻿<Window x:Class="Nox.Amuse.View.SimpleWorldExplorer"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        mc:Ignorable="d"
        Title="World Explorer"
        Height="300"
        Width="350"
        Icon="/Amuse;component/Amuse.ico"
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner">
    <Grid Margin="11">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Grid.ColumnSpan="4"
                Margin="-11,-11,-11,0">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0"
                                     Opacity="0.5">
                    <GradientStop Offset="0"
                                  Color="{StaticResource AmuseBlue}" />
                    <GradientStop Color="White"
                                  Offset="0.4" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <TextBlock Text="Choose a world to connect to:"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Center"
                   Foreground="DodgerBlue"
                   FontSize="18"
                   Grid.ColumnSpan="2"
                   Margin="0,0,0,11" />
        <ListBox ItemsSource="{Binding Worlds}"
                 SelectedItem="{Binding SelectedWorld}"
                 Grid.Row="1"
                 Grid.RowSpan="5"
                 Margin="0,0,7,11">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding DisplayName}"
                               Margin="1" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Button Content="_Add New World"
                Command="{Binding AddWorldCommand}"
                Grid.Column="1"
                Grid.Row="1" />
        <Rectangle Grid.Column="1"
                   Grid.Row="2"
                   Height="2"
                   VerticalAlignment="Center"
                   Fill="DarkGray"
                   Margin="5,7" />
        <Button Content="_Edit World"
                IsEnabled="False"
                Grid.Column="1"
                Grid.Row="3" />
        <Button Content="_Delete World"
                Command="{Binding DeleteWorldCommand}"
                Grid.Column="1"
                Grid.Row="4"
                Margin="0,7
                " />
        <Border Grid.Row="6"
                Grid.ColumnSpan="2"
                Margin="-11,0,-11,-11">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0"
                                     Opacity="0.5">
                    <GradientStop Color="White"
                                  Offset="0.2" />
                    <GradientStop Color="{StaticResource {x:Static SystemColors.ControlDarkColorKey}}"
                                  Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Button x:Name="buttonClose"
                Content="Close"
                IsCancel="True"
                IsDefault="True"
                Grid.Row="6"
                Grid.Column="1" />
        <Button Content="_Connect"
                Command="{Binding ConnectToWorldCommand}"
                Grid.Row="6"
                Margin="0,0,7,0"
                Width="{Binding ElementName=buttonClose, Path=ActualWidth}"
                HorizontalAlignment="Right" />
    </Grid>
</Window>
